package com.mydemo.design_pattern.action_type.strategy_pattern.demo2;

/**
 * <p></p >
 *
 * @author liming1
 * @version $Id: PayContext, v1.0 2019-09-24 13:44 liming1 Exp $
 */
public class PayContext {

    private  PayStrategy payStrategy;

    public void setPayStrategy(PayStrategy payStrategy) {
        this.payStrategy = payStrategy;
    }

    public Object toPay(PayRequest request){
        return payStrategy.pay(request);
    }

}
